package Controllers;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class BieuThucChinhQuy {

    private String chuoikt;
    private String btchinhquy;

    public BieuThucChinhQuy(String chuoikt, String btchinhquy) {
        this.chuoikt = chuoikt;
        this.btchinhquy = btchinhquy;
    }

    public String getBtchinhquy() {
        return btchinhquy;
    }

    public String getChuoikt() {
        return chuoikt;
    }

    public void setBtchinhquy(String btchinhquy) {
        this.btchinhquy = btchinhquy;
    }

    public void setChuoikt(String chuoikt) {
        this.chuoikt = chuoikt;
    }

    public boolean isBoolean() {
        Pattern reg = Pattern.compile(this.btchinhquy, Pattern.UNICODE_CASE);
        Matcher ktr = reg.matcher(this.chuoikt);
        return ktr.matches();
    }
}
